package com.liang.jiekou.mapper;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.liang.jiekou.entity.CMSME;
import com.liang.jiekou.entity.MOCTF;
import com.liang.jiekou.entity.MOCTG;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface RUKUMapper {

    @DS("demo")
    //查询TF001字段对应的TF002的单别存不存在，不存在就创建，存在就在对应单号上面按照编码格式加一个00001
    String  getNewTF002Year2(String TF001);


    @DS("demo")
    //查询TF001字段对应的TF002的单别存不存在，不存在就创建，存在就在对应单号上面按照编码格式加一个000001
    String  getNewTF002Year0(String TF001);


    @DS("demo")
    //查询TF001字段对应的TF002的单别存不存在，不存在就创建，存在就在对应单号上面按照编码格式加一个001
    String  getNewTF002Year4(String TF001);


    @DS("demo")
    //插入MOCTF实体
    int insertMOCTFDATA(MOCTF moctf);

    @DS("demo")
    //插入MOCTG实体
    int insertMOCTGDATA(MOCTG moctg);

    @DS("demo")
    void deleteMOCTF(String TF001, String TF002);

    @DS("demo")
    void deleteMOCTG(String TF001, String TF002);

    @DS("demo")
    @Select("SELECT MAX(TF002) FROM MOCTF")
    Long getDH();

    @DS("demo")
    @Select("SELECT COMPANY,USR_GROUP FROM CMSME WHERE CREATOR = #{creator}")
    CMSME selectCMSME(String creator);

    @DS("demo")
    void deleteMoctf(String tf001, String tf002);

    @DS("demo")
    void deleteMoctg(String tg001, String tg002, String tg003);
}
